<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head th:replace="~{fragments/header :: header}">
</head>
<body>


<div th:if="${message}">
    <h2 th:text="${message}"/>
</div>

<div>
    <form method="POST" enctype="multipart/form-data" action="/">
        <table class="table">
            <tr><td>File to upload:</td><td><input type="file" name="file" class="btn btn-primary" /></td></tr>
            <tr><td></td><td><input type="submit" value="Upload" class="btn btn-primary" /></td></tr>
        </table>
    </form>
</div>

<div>
 
    
    <table class="table table-stript">
    <thead>
    <tr>
        <td>Name</td>
        <td>ID</td>
        <td>contentType</td>
        <td>size</td>
        <td>uploadDate</td>
        <td>md5</td>
    </tr>
    </thead>
    <tbody>
    <tr th:if="${files.size()} eq 0">
        <td colspan="3">no file</td>
    </tr>
    <tr th:each="file : ${files}">
        <td><a th:href="${file.id}" th:text="${file.name}" /></td>
        <td th:text="${file.id}" ></td>
        <td th:text="${file.contentType}" ></td>
        <td th:text="${file.size}" ></td>
        <td th:text="${file.uploadDate}" ></td>
        <td th:text="${file.md5}" ></td>
    </tr>
    </tbody>
</table>
</div>

<div th:replace="~{fragments/footer :: footer}">...</div>
</body>
</html>
